import * as React from 'react'
import { Spin } from 'antd'

interface ILoadingProps {
	size?: 'small' | 'default' | 'large'
}

export default class Loading extends React.Component<ILoadingProps>{

	render() {
		const { size = 'default' } = this.props
		return (
			<div style={styles.spinClass}>
				<Spin size={size} />
			</div>
		)
	}
}

const styles = {
	spinClass: {
		minHeight: '100%',
		display: 'flex',
		justifyContent: 'center',
		alignItems: 'center'
	}
}
